import request from "../../utils/request";

// 查询购物车信息

export function getCart() {
	return request({
		url: '/order/order/list',
		method: 'get'
	})
}

// 查询订单信息
export function getProductById(id) {
	return request({
		url: '/product/product/query?id='+id,
		method: 'get'
	})
}

//新增购物车
export function addCart(data) {
	return request({
		url: '/order/order',
		method: 'post',
		data: data
	})
}
// export function getProductId(id) {
// 	return request({
// 		url: '/order/order?id='+id,
// 		method: 'get'
// 	})
// }
//删除购物车
export function removeCart(id) {
	return request({
		url: '/order/order/'+id,
		method: 'delete'
	})
}

export function getInfo(id) {
	return request({
		url: '/order/order/query?id='+id,
		method: 'delete'
	})
}
export function removeProduct(id) {
	return request({
		url: '/product/product/remove/'+id,
		method: 'delete'
	})
}



